

#include <TinyGPSPlus.h>

#include <stdio.h>  
#include <math.h>  


// 地球半径，单位：千米  
#define EARTH_RADIUS 6371  
#define BUFFSIZE 800

class L76XLocation {

public:
    L76XLocation();
    void setBaudrate(unsigned long baudrate);
    void sendCommand(char * data);
    double haversine(double lat1, double lon1, double lat2, double lon2);
    TinyGPSPlus getGPS();
private:
    char * NMEA();
    void writeByte(char data);
    void writeString(char * data);

    TinyGPSPlus gps;
    char const Temp[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
    char buff[BUFFSIZE];
};
